import request from '@/utils/request'

export function adList(query) {
  return request({
    url: '/jbl-marketing/api/admin/v1/ad/select/page',
    method: 'get',
    params: query
  })
}

export function adDel(query) {
  return request({
    url: '/jbl-marketing/api/admin/v1/ad/deleteById',
    method: 'get',
    params: query
  })
}

export function adAdd(data) {
  return request({
    url: '/jbl-marketing/api/admin/v1/ad/add',
    method: 'post',
    data
  })
}

export function adDetail(query) {
  return request({
    url: '/jbl-marketing/api/admin/v1/ad/getById',
    method: 'get',
    params: query
  })
}

export function adEdit(data) {
  return request({
    url: '/jbl-marketing/api/admin/v1/ad/updateById',
    method: 'post',
    data
  })
}
